
<%--
  Created by IntelliJ IDEA.
  User: 小正
  Date: 2024/11/7
  Time: 下午11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户登录</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html {
            height: 100%;
        }

        body {
            height: 100%;
            background-image: linear-gradient(to right, rgba(169, 0, 253, 0.37), rgba(0, 253, 194, 0.6));
        }

        .container {
            height: 100%;

        }

        .login-wrapper {
            background-color: rgb(255, 241, 196);
            width: 358px;
            height: 588px;
            border-radius: 15px;
            padding: 0 50px;
            position: relative;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        .header {
            font-size: 38px;
            font-weight: bold;
            text-align: center;
            line-height: 100px;
        }

        .btn {
            text-align: center;
            padding: 10px;
            width: 100%;
            margin-top: 40px;
            background-image: linear-gradient(to right, rgba(169, 0, 253, 0.37), rgba(0, 253, 194, 0.6));
            color: #fff;
        }

        .msg {
            text-align: center;
            line-height: 88px;
        }

        a {
            text-decoration-line: none;
            color: #abc1ee;
        }

        .form-select {
            margin-top: 20px;
        }
    </style>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
            integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
            crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
    <div class="login-wrapper">
        <form method="post" action="/login">
            <div class="header">登录</div>
            <% if (request.getAttribute("errorMessage") != null) { %>
            <div class="alert alert-danger" role="alert">
                <%= request.getAttribute("errorMessage") %>
            </div>
            <% } %>
            <div class="form-wrapper">
                <div class="mb-3">
                    <label class="form-label">账号</label>
                        <input type="text" class="form-control" name="ID" placeholder="请输入账号">
                </div>
                <label class="form-label">密码</label>
                <input type="password" name="password" class="form-control" aria-describedby="passwordHelpBlock"
                       placeholder="请输入密码">

                <select class="form-select" aria-label="Default select example" name="identity" style="margin-top: 50px">
                    <option selected>选择身份</option>
                    <option value="user">管理员</option>
                    <option value="student">学生</option>
                    <option value="instructor">辅导员</option>
                </select>
                <input type="submit" class="btn" value="登录"/>
            </div>
        </form>
    </div>
</div>
</body>
</html>


